<template>
<div :id="options.id" style="width: 100%;height: 100%"></div>
</template>

<script>
const echarts = require("echarts");
export default {
  name: "Emap",
  props: {
    options: {
      type: Object,
      required: true
    }
  },
  methods: {
    init() {
      const dom = document.getElementById(this.options.id);
      let myChart = echarts.init(dom);
      myChart.setOption(this.options);
    }
  },
  mounted() {
    this.init();
  }
};
</script>
